package config.interceptor;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

import javax.sound.midi.Soundbank;

/**
 * Created by Administrator on 2017/1/6.
 */
public class GlobalActionInterceptor implements Interceptor {
    public void intercept(Invocation invocation) {
        System.out.println("控制层全局拦截器前");
        invocation.invoke();
        String actionKey = invocation.getActionKey();
        String controllerKey = invocation.getControllerKey();
        String viewPath = invocation.getViewPath();
        System.out.println(actionKey);
        System.out.println(controllerKey);
        System.out.println(viewPath);
        System.out.println("控制层全局拦截器后");
    }
}
